var $ = require("../../utils/Ajax.js");
Page({
  data: {
    // 消息数据
    Attention: [],
  },

  onLoad: function (options) {
    var that = this;
    wx.setNavigationBarTitle({
      title: "我的关注"
    }) 

    $.Ajax("api/friends1", "GET", {}, function (res) {
      console.log(res)
      if(res.s){
        that.setData({
          Attention: res.d.users
        })
      }else{
        wx.showToast({
          title: res.m,
          icon: 'none',
          duration: 1500
        })
      }
    })
  },
  
  // 点击进入个人资料
  Data: function(e){
    var Id = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: '../Data/Data?Id=' + Id,
    })
  }
})